The invention relates generally to a method and apparatus for scaling and enhancement of digital image data. In particular, the invention relates to a method of enhancing image quality in images reproduced by higher resolution printers and display devices.
Digital video images such as those seen on computer display monitors are typically formatted according to industry standards (e.g., VGA, SVGA and XGA). Each standard defines various resolutions. Commonly, many different resolutions are supported by computer displays, however, flat panel displays and fixed resolution cathode ray tubes (CRTs) generally do not support multiple resolutions.
Digital image data can be scaled to make it compliant with the requirements of different standards. For example, VGA (640xc3x97480) data is scaled by a factor of 1.6 to fill a fixed XGA (1024xc3x97768) display. In some cases the source image resolution is higher than the monitor and must be scaled down. Some display devices are not capable of scaling images and thus only use a portion of the display area or a subset of the source image data.
A basic scaling technique is pixel replication which exhibits dramatic artifacts for fractional scale factors. Other traditional scaling algorithms do not provide maximum quality for fixed resolution monitors. The resulting images often appear out of focus or reveal jagged edges.
Commercially available printers generally have output resolutions which exceed the resolution of the digital image. For example, images embedded in web pages downloaded from the Internet typically have low resolution. Consequently, multiple printer output pixels are generally available for each input image pixel. Unfortunately, the higher printer resolution typically is not effectively utilized to improve the quality in the printed image.
The present invention relates to a method for enhancing a digital image. The method includes receiving a digital source image and selecting a block of source pixels. The source pixels include a center pixel that bounds the center position of the output pixel in a source coordinate system. A first edge array is generated from edges detected in the block of source pixels and processed with a set of logic operations to detect one of a plurality of edge patterns. In one embodiment, the source pixels are converted from a red-green-blue (RGB) color space to a luminance-chrominance (LCC) color space.
The method also includes the step of transforming the source coordinate system into a second coordinate system in response to the detected edge pattern. A transformed source location for the output pixel is determined in the second coordinate system. In one embodiment, the transformation includes rotating the source coordinate system into the second coordinate system in response to the detected edge pattern. In a further embodiment, the rotation is through a predetermined angle matched to the detected edge pattern. In another embodiment, the transformed source location is modified by applying one of a plurality of modifier functions to generate a modified transformed source location for the output pixel. In a further embodiment, the applied modifier function is selected in response to the detected edge pattern.
The method also includes the step of generating an effective source location for the output pixel by applying a reverse transformation to the transformed source location. In one embodiment, the reverse transformation includes applying a reverse rotation to the transformed source location.
In one embodiment, the method includes the additional step of calculating a value of the output pixel based on the value of at least one source pixel within the block of source pixels. In a further embodiment, the step of calculating the value of the output pixel includes interpolating the value of the output pixel in response to the effective source location of the output pixel relative to the block of source pixels. In a further embodiment, the step of interpolating includes applying a bilinear interpolation using four adjacent pixels from the block of source pixels.